3.882 \(\int \cos ^2(c+d x) (a+b \sec (c+d x))^3 (A+B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\)
Optimal. Leaf size=204 \[ -\frac {b \tan (c+d x) \left (4 a^2 B+9 a A b-6 a b C-2 b^2 B\right )}{2 d}+\frac {b \left (6 a^2 C+6 a b B+2 A b^2+b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {1}{2} a x \left (a^2 (A+2 C)+6 a b B+6 A b^2\right )-\frac {b^2 \tan (c+d x) \sec (c+d x) (2 a B+4 A b-b C)}{2 d}+\frac {(2 a B+3 A b) \sin (c+d x) (a+b \sec (c+d x))^2}{2 d}+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d} \]
[Out]
1/2*a*(6*A*b^2+6*a*b*B+a^2*(A+2*C))*x+1/2*b*(2*A*b^2+6*B*a*b+6*C*a^2+C*b^2)*arctanh(sin(d*x+c))/d+1/2*(3*A*b+2
*B*a)*(a+b*sec(d*x+c))^2*sin(d*x+c)/d+1/2*A*cos(d*x+c)*(a+b*sec(d*x+c))^3*sin(d*x+c)/d-1/2*b*(9*A*a*b+4*B*a^2-
2*B*b^2-6*C*a*b)*tan(d*x+c)/d-1/2*b^2*(4*A*b+2*B*a-C*b)*sec(d*x+c)*tan(d*x+c)/d
________________________________________________________________________________________
Rubi [A] time = 0.46, antiderivative size = 204, normalized size of antiderivative = 1.00,
number of steps used = 7, number of rules used = 5, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used =
{4094, 4048, 3770, 3767, 8} \[ -\frac {b \tan (c+d x) \left (4 a^2 B+9 a A b-6 a b C-2 b^2 B\right )}{2 d}+\frac {b \left (6 a^2 C+6 a b B+2 A b^2+b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {1}{2} a x \left (a^2 (A+2 C)+6 a b B+6 A b^2\right )-\frac {b^2 \tan (c+d x) \sec (c+d x) (2 a B+4 A b-b C)}{2 d}+\frac {(2 a B+3 A b) \sin (c+d x) (a+b \sec (c+d x))^2}{2 d}+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^3}{2 d} \]
Antiderivative was successfully verified.
[In]
Int[Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
[Out]
(a*(6*A*b^2 + 6*a*b*B + a^2*(A + 2*C))*x)/2 + (b*(2*A*b^2 + 6*a*b*B + 6*a^2*C + b^2*C)*ArcTanh[Sin[c + d*x]])/
(2*d) + ((3*A*b + 2*a*B)*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (A*Cos[c + d*x]*(a + b*Sec[c + d*x])^3*S
in[c + d*x])/(2*d) - (b*(9*a*A*b + 4*a^2*B - 2*b^2*B - 6*a*b*C)*Tan[c + d*x])/(2*d) - (b^2*(4*A*b + 2*a*B - b*
C)*Sec[c + d*x]*Tan[c + d*x])/(2*d)
Rule 8
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
Rule 3767
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Rule 3770
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rule 4048
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) +
(a_)), x_Symbol] :> -Simp[(b*C*Csc[e + f*x]*Cot[e + f*x])/(2*f), x] + Dist[1/2, Int[Simp[2*A*a + (2*B*a + b*(
2*A + C))*Csc[e + f*x] + 2*(a*C + B*b)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x]
Rule 4094
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(A*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*(d*
Csc[e + f*x])^n)/(f*n), x] - Dist[1/(d*n), Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Simp[A*b*
m - a*B*n - (b*B*n + a*(C*n + A*(n + 1)))*Csc[e + f*x] - b*(C*n + A*(m + n + 1))*Csc[e + f*x]^2, x], x], x] /;
FreeQ[{a, b, d, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && LeQ[n, -1]
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+b \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}+\frac {1}{2} \int \cos (c+d x) (a+b \sec (c+d x))^2 \left (3 A b+2 a B+(2 b B+a (A+2 C)) \sec (c+d x)-2 b (A-C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {(3 A b+2 a B) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}+\frac {1}{2} \int (a+b \sec (c+d x)) \left (6 A b^2+6 a b B+a^2 (A+2 C)-b (a A-2 b B-4 a C) \sec (c+d x)-2 b (4 A b+2 a B-b C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {(3 A b+2 a B) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {b^2 (4 A b+2 a B-b C) \sec (c+d x) \tan (c+d x)}{2 d}+\frac {1}{4} \int \left (2 a \left (6 A b^2+6 a b B+a^2 (A+2 C)\right )+2 b \left (2 A b^2+6 a b B+6 a^2 C+b^2 C\right ) \sec (c+d x)-2 b \left (9 a A b+4 a^2 B-2 b^2 B-6 a b C\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {1}{2} a \left (6 A b^2+6 a b B+a^2 (A+2 C)\right ) x+\frac {(3 A b+2 a B) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {b^2 (4 A b+2 a B-b C) \sec (c+d x) \tan (c+d x)}{2 d}-\frac {1}{2} \left (b \left (9 a A b+4 a^2 B-2 b^2 B-6 a b C\right )\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{2} \left (b \left (2 A b^2+6 a b B+6 a^2 C+b^2 C\right )\right ) \int \sec (c+d x) \, dx\\ &=\frac {1}{2} a \left (6 A b^2+6 a b B+a^2 (A+2 C)\right ) x+\frac {b \left (2 A b^2+6 a b B+6 a^2 C+b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {(3 A b+2 a B) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {b^2 (4 A b+2 a B-b C) \sec (c+d x) \tan (c+d x)}{2 d}+\frac {\left (b \left (9 a A b+4 a^2 B-2 b^2 B-6 a b C\right )\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{2 d}\\ &=\frac {1}{2} a \left (6 A b^2+6 a b B+a^2 (A+2 C)\right ) x+\frac {b \left (2 A b^2+6 a b B+6 a^2 C+b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {(3 A b+2 a B) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{2 d}-\frac {b \left (9 a A b+4 a^2 B-2 b^2 B-6 a b C\right ) \tan (c+d x)}{2 d}-\frac {b^2 (4 A b+2 a B-b C) \sec (c+d x) \tan (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.85, size = 320, normalized size = 1.57 \[ \frac {a^3 A \sin (2 (c+d x))+2 a (c+d x) \left (a^2 (A+2 C)+6 a b B+6 A b^2\right )-2 b \left (6 a^2 C+6 a b B+2 A b^2+b^2 C\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 b \left (6 a^2 C+6 a b B+2 A b^2+b^2 C\right ) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+4 a^2 (a B+3 A b) \sin (c+d x)+\frac {4 b^2 (3 a C+b B) \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}+\frac {4 b^2 (3 a C+b B) \sin \left (\frac {1}{2} (c+d x)\right )}{\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )}+\frac {b^3 C}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {b^3 C}{\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^2}}{4 d} \]
Antiderivative was successfully verified.
[In]
Integrate[Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]
[Out]
(2*a*(6*A*b^2 + 6*a*b*B + a^2*(A + 2*C))*(c + d*x) - 2*b*(2*A*b^2 + 6*a*b*B + 6*a^2*C + b^2*C)*Log[Cos[(c + d*
x)/2] - Sin[(c + d*x)/2]] + 2*b*(2*A*b^2 + 6*a*b*B + 6*a^2*C + b^2*C)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]
+ (b^3*C)/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^2 + (4*b^2*(b*B + 3*a*C)*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2]
- Sin[(c + d*x)/2]) - (b^3*C)/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2 + (4*b^2*(b*B + 3*a*C)*Sin[(c + d*x)/2])
/(Cos[(c + d*x)/2] + Sin[(c + d*x)/2]) + 4*a^2*(3*A*b + a*B)*Sin[c + d*x] + a^3*A*Sin[2*(c + d*x)])/(4*d)
________________________________________________________________________________________
fricas [A] time = 1.07, size = 208, normalized size = 1.02 \[ \frac {2 \, {\left ({\left (A + 2 \, C\right )} a^{3} + 6 \, B a^{2} b + 6 \, A a b^{2}\right )} d x \cos \left (d x + c\right )^{2} + {\left (6 \, C a^{2} b + 6 \, B a b^{2} + {\left (2 \, A + C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (6 \, C a^{2} b + 6 \, B a b^{2} + {\left (2 \, A + C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a^{3} \cos \left (d x + c\right )^{3} + C b^{3} + 2 \, {\left (B a^{3} + 3 \, A a^{2} b\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")
[Out]
1/4*(2*((A + 2*C)*a^3 + 6*B*a^2*b + 6*A*a*b^2)*d*x*cos(d*x + c)^2 + (6*C*a^2*b + 6*B*a*b^2 + (2*A + C)*b^3)*co
s(d*x + c)^2*log(sin(d*x + c) + 1) - (6*C*a^2*b + 6*B*a*b^2 + (2*A + C)*b^3)*cos(d*x + c)^2*log(-sin(d*x + c)
+ 1) + 2*(A*a^3*cos(d*x + c)^3 + C*b^3 + 2*(B*a^3 + 3*A*a^2*b)*cos(d*x + c)^2 + 2*(3*C*a*b^2 + B*b^3)*cos(d*x
+ c))*sin(d*x + c))/(d*cos(d*x + c)^2)
________________________________________________________________________________________
giac [B] time = 0.36, size = 540, normalized size = 2.65 \[ \frac {{\left (A a^{3} + 2 \, C a^{3} + 6 \, B a^{2} b + 6 \, A a b^{2}\right )} {\left (d x + c\right )} + {\left (6 \, C a^{2} b + 6 \, B a b^{2} + 2 \, A b^{3} + C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (6 \, C a^{2} b + 6 \, B a b^{2} + 2 \, A b^{3} + C b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 2 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")
[Out]
1/2*((A*a^3 + 2*C*a^3 + 6*B*a^2*b + 6*A*a*b^2)*(d*x + c) + (6*C*a^2*b + 6*B*a*b^2 + 2*A*b^3 + C*b^3)*log(abs(t
an(1/2*d*x + 1/2*c) + 1)) - (6*C*a^2*b + 6*B*a*b^2 + 2*A*b^3 + C*b^3)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(
A*a^3*tan(1/2*d*x + 1/2*c)^7 - 2*B*a^3*tan(1/2*d*x + 1/2*c)^7 - 6*A*a^2*b*tan(1/2*d*x + 1/2*c)^7 + 6*C*a*b^2*t
an(1/2*d*x + 1/2*c)^7 + 2*B*b^3*tan(1/2*d*x + 1/2*c)^7 - C*b^3*tan(1/2*d*x + 1/2*c)^7 - 3*A*a^3*tan(1/2*d*x +
1/2*c)^5 + 2*B*a^3*tan(1/2*d*x + 1/2*c)^5 + 6*A*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 6*C*a*b^2*tan(1/2*d*x + 1/2*c)^
5 + 2*B*b^3*tan(1/2*d*x + 1/2*c)^5 - 3*C*b^3*tan(1/2*d*x + 1/2*c)^5 + 3*A*a^3*tan(1/2*d*x + 1/2*c)^3 + 2*B*a^3
*tan(1/2*d*x + 1/2*c)^3 + 6*A*a^2*b*tan(1/2*d*x + 1/2*c)^3 - 6*C*a*b^2*tan(1/2*d*x + 1/2*c)^3 - 2*B*b^3*tan(1/
2*d*x + 1/2*c)^3 - 3*C*b^3*tan(1/2*d*x + 1/2*c)^3 - A*a^3*tan(1/2*d*x + 1/2*c) - 2*B*a^3*tan(1/2*d*x + 1/2*c)
- 6*A*a^2*b*tan(1/2*d*x + 1/2*c) - 6*C*a*b^2*tan(1/2*d*x + 1/2*c) - 2*B*b^3*tan(1/2*d*x + 1/2*c) - C*b^3*tan(1
/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^4 - 1)^2)/d
________________________________________________________________________________________
maple [A] time = 0.98, size = 267, normalized size = 1.31 \[ \frac {A \,a^{3} \sin \left (d x +c \right ) \cos \left (d x +c \right )}{2 d}+\frac {a^{3} A x}{2}+\frac {A \,a^{3} c}{2 d}+\frac {a^{3} B \sin \left (d x +c \right )}{d}+a^{3} C x +\frac {C \,a^{3} c}{d}+\frac {3 A \,a^{2} b \sin \left (d x +c \right )}{d}+3 B x \,a^{2} b +\frac {3 B \,a^{2} b c}{d}+\frac {3 C \,a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+3 A x a \,b^{2}+\frac {3 A a \,b^{2} c}{d}+\frac {3 B a \,b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {3 C a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {A \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {b^{3} B \tan \left (d x +c \right )}{d}+\frac {b^{3} C \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {b^{3} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x)
[Out]
1/2/d*A*a^3*sin(d*x+c)*cos(d*x+c)+1/2*a^3*A*x+1/2/d*A*a^3*c+a^3*B*sin(d*x+c)/d+a^3*C*x+1/d*C*a^3*c+3/d*A*a^2*b
*sin(d*x+c)+3*B*x*a^2*b+3/d*B*a^2*b*c+3/d*C*a^2*b*ln(sec(d*x+c)+tan(d*x+c))+3*A*x*a*b^2+3/d*A*a*b^2*c+3/d*B*a*
b^2*ln(sec(d*x+c)+tan(d*x+c))+3/d*C*a*b^2*tan(d*x+c)+1/d*A*b^3*ln(sec(d*x+c)+tan(d*x+c))+1/d*b^3*B*tan(d*x+c)+
1/2/d*b^3*C*sec(d*x+c)*tan(d*x+c)+1/2/d*b^3*C*ln(sec(d*x+c)+tan(d*x+c))
________________________________________________________________________________________
maxima [A] time = 0.36, size = 243, normalized size = 1.19 \[ \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} + 4 \, {\left (d x + c\right )} C a^{3} + 12 \, {\left (d x + c\right )} B a^{2} b + 12 \, {\left (d x + c\right )} A a b^{2} - C b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, C a^{2} b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 6 \, B a b^{2} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, B a^{3} \sin \left (d x + c\right ) + 12 \, A a^{2} b \sin \left (d x + c\right ) + 12 \, C a b^{2} \tan \left (d x + c\right ) + 4 \, B b^{3} \tan \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^2*(a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")
[Out]
1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*A*a^3 + 4*(d*x + c)*C*a^3 + 12*(d*x + c)*B*a^2*b + 12*(d*x + c)*A*a*b^2
- C*b^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 6*C*a^2*b*(log
(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 6*B*a*b^2*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 2*A*
b^3*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 4*B*a^3*sin(d*x + c) + 12*A*a^2*b*sin(d*x + c) + 12*C*a*
b^2*tan(d*x + c) + 4*B*b^3*tan(d*x + c))/d
________________________________________________________________________________________
mupad [B] time = 7.20, size = 3879, normalized size = 19.01 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(cos(c + d*x)^2*(a + b/cos(c + d*x))^3*(A + B/cos(c + d*x) + C/cos(c + d*x)^2),x)
[Out]
(a*atan(((a*(tan(c/2 + (d*x)/2)*(8*A^2*a^6 + 32*A^2*b^6 + 32*C^2*a^6 + 8*C^2*b^6 + 288*A^2*a^2*b^4 + 96*A^2*a^
4*b^2 + 288*B^2*a^2*b^4 + 288*B^2*a^4*b^2 + 96*C^2*a^2*b^4 + 288*C^2*a^4*b^2 + 32*A*C*a^6 + 32*A*C*b^6 + 192*A
*B*a*b^5 + 96*A*B*a^5*b + 96*B*C*a*b^5 + 192*B*C*a^5*b + 576*A*B*a^3*b^3 + 192*A*C*a^2*b^4 + 192*A*C*a^4*b^2 +
576*B*C*a^3*b^3) - (a*(A*a^2 + 6*A*b^2 + 2*C*a^2 + 6*B*a*b)*(16*A*a^3 + 32*A*b^3 + 32*C*a^3 + 16*C*b^3 + 96*A
*a*b^2 + 96*B*a*b^2 + 96*B*a^2*b + 96*C*a^2*b)*1i)/2)*(A*a^2 + 6*A*b^2 + 2*C*a^2 + 6*B*a*b))/2 + (a*(tan(c/2 +
(d*x)/2)*(8*A^2*a^6 + 32*A^2*b^6 + 32*C^2*a^6 + 8*C^2*b^6 + 288*A^2*a^2*b^4 + 96*A^2*a^4*b^2 + 288*B^2*a^2*b^
4 + 288*B^2*a^4*b^2 + 96*C^2*a^2*b^4 + 288*C^2*a^4*b^2 + 32*A*C*a^6 + 32*A*C*b^6 + 192*A*B*a*b^5 + 96*A*B*a^5*
b + 96*B*C*a*b^5 + 192*B*C*a^5*b + 576*A*B*a^3*b^3 + 192*A*C*a^2*b^4 + 192*A*C*a^4*b^2 + 576*B*C*a^3*b^3) + (a
*(A*a^2 + 6*A*b^2 + 2*C*a^2 + 6*B*a*b)*(16*A*a^3 + 32*A*b^3 + 32*C*a^3 + 16*C*b^3 + 96*A*a*b^2 + 96*B*a*b^2 +
96*B*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 32*A*C*a^6 + 32*A*C*b^6 + 192*A*B*a*b^5 + 96*A*B*a^5*b
+ 96*B*C*a*b^5 + 192*B*C*a^5*b + 576*A*B*a^3*b^3 + 192*A*C*a^2*b^4 + 192*A*C*a^4*b^2 + 576*B*C*a^3*b^3))*(A*b^
3 + (C*b^3)/2 + 3*B*a*b^2 + 3*C*a^2*b) - 192*A^3*a*b^8 + 192*C^3*a^8*b + 576*A^3*a^2*b^7 - 32*A^3*a^3*b^6 + 19
2*A^3*a^4*b^5 + 16*A^3*a^6*b^3 - 1728*B^3*a^4*b^5 + 1728*B^3*a^5*b^4 - 16*C^3*a^3*b^6 - 192*C^3*a^5*b^4 + 32*C
^3*a^6*b^3 - 576*C^3*a^7*b^2 - 48*A*C^2*a*b^8 + 192*A*C^2*a^8*b - 192*A^2*C*a*b^8 + 48*A^2*C*a^8*b - 2880*A*B^
2*a^3*b^6 + 4032*A*B^2*a^4*b^5 - 288*A*B^2*a^5*b^4 + 576*A*B^2*a^6*b^3 - 1344*A^2*B*a^2*b^7 + 2880*A^2*B*a^3*b
^6 - 192*A^2*B*a^4*b^5 + 768*A^2*B*a^5*b^4 + 48*A^2*B*a^7*b^2 - 648*A*C^2*a^3*b^6 + 192*A*C^2*a^4*b^5 - 2208*A
*C^2*a^5*b^4 + 1248*A*C^2*a^6*b^3 - 288*A*C^2*a^7*b^2 + 288*A^2*C*a^2*b^7 - 1248*A^2*C*a^3*b^6 + 2208*A^2*C*a^
4*b^5 - 192*A^2*C*a^5*b^4 + 648*A^2*C*a^6*b^3 - 48*B*C^2*a^2*b^7 - 768*B*C^2*a^4*b^5 + 192*B*C^2*a^5*b^4 - 288
0*B*C^2*a^6*b^3 + 1344*B*C^2*a^7*b^2 - 576*B^2*C*a^3*b^6 + 288*B^2*C*a^4*b^5 - 4032*B^2*C*a^5*b^4 + 2880*B^2*C
*a^6*b^3 - 768*A*B*C*a^2*b^7 + 576*A*B*C*a^3*b^6 - 5088*A*B*C*a^4*b^5 + 5088*A*B*C*a^5*b^4 - 576*A*B*C*a^6*b^3
+ 768*A*B*C*a^7*b^2))*(A*b^3*2i + C*b^3*1i + B*a*b^2*6i + C*a^2*b*6i))/d
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)**2*(a+b*sec(d*x+c))**3*(A+B*sec(d*x+c)+C*sec(d*x+c)**2),x)
[Out]
Timed out
________________________________________________________________________________________